package com.example.demo4_sport.mapper;

import com.example.demo4_sport.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    public User getUserByMessage(@Param("username") String username, @Param("password") String password);

    public List<User> getAllUsersByPages(@Param("username") String username,@Param("pageStart") Integer pageStart,@Param("pageSize") Integer PageSize);

    public Integer getUserCounts(@Param("username") String username);

    public Integer changeUserState(@Param("id")Integer id, @Param("state")Boolean state);

    public Integer insertUser(User user);

    public Integer deleteUserById(@Param("id") Integer id);

    public User getUpdateUserById(@Param("id") Integer id);

    public Integer updateUserById(User user);
}
